package com.changanw.tienchin.web.controller.tienchin.clue;


import com.changanw.tienchin.assignment.domain.Assignment;
import com.changanw.tienchin.assignment.service.IAssignmentService;
import com.changanw.tienchin.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author changanw
 * @since 2023-11-25
 */
@RestController
@RequestMapping("/tienchin/clue/assignment")
public class AssignmentController {
  @Autowired
  IAssignmentService assignmentService;

  @PreAuthorize("hasAnyPermissions('tienchin:clue:assign','tienchin:business:assign')")
  @PostMapping
  public AjaxResult assignClue(@Validated @RequestBody Assignment assignment){
    return assignmentService.assignClue(assignment);
  }
}
